package com.jt.web.controller;

import com.jt.pojo.ItemDesc;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class CorsController {

    @RequestMapping("/web/cors")
    @CrossOrigin(value = "http://www.jt.com",methods = RequestMethod.GET)
    public ItemDesc cors(){
        ItemDesc itemDesc=new ItemDesc().setItemDesc("CORS测试").setItemId(1000L);
        return itemDesc;
    }

}
